package com.situ.water_BE.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.situ.water_BE.pojo.BeOrderuser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Angel
 * @since 2020-12-01
 */
@Mapper
@Resource
public interface BeOrderuserMapper extends BaseMapper<BeOrderuser> {
    @Override
    public int insert(BeOrderuser beOrderuser) ;
    @Select("select userNo from BE_OrderUser where userNo is not null ORDER BY OrderNo desc limit 1")
    public String queryUserNo();
    @Select("select ContractNum from be_orderuser where ContractNum is not null ORDER BY id DESC LIMIT 1")
    public String getContractNum();
    @Select("SELECT * FROM be_order o,be_orderuser u where o.OrderNo=u.OrderNo and o.OrderNo=#{orderNo}")
    public List<Map> queryAllOrderAndOrderUser(String orderNo);
}
